package com.lhd.qd.module.system.dept.model.converter;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lhd.qd.module.system.dept.model.dataobj.DeptDO;
import com.lhd.qd.module.system.dept.model.dto.DeptSaveDTO;
import com.lhd.qd.module.system.dept.model.vo.DeptDetailVO;
import com.lhd.qd.module.system.dept.model.vo.DeptListVO;
import com.lhd.qd.module.system.dept.model.vo.DeptTreeVO;
import org.mapstruct.Mapper;
import org.mapstruct.Named;
import org.mapstruct.factory.Mappers;

@Mapper
public abstract class AbstractDeptConverter {

    public static AbstractDeptConverter INSTANCE = Mappers.getMapper(AbstractDeptConverter.class);

    public abstract Page<DeptListVO> doPage2ListVOPage(IPage<DeptDO> doPage);

    public abstract DeptDetailVO do2DetailVO(DeptDO dataObj);

    public abstract DeptDO saveDTO2DO(DeptSaveDTO saveDTO);

    @Named("do2TreeVO")
    public abstract DeptTreeVO do2TreeVO(DeptDO dataObj);
}
